using Godot;
using System;
[GlobalClass]

public partial class BTLeaf : BTNode//叶节点，执行行为的最底层节点，本身没有子节点
{
	public StateMachine _stateMachine;
	public override void _Ready()
	{
		if(this.GetChildCount() != 0)
		{
			GD.Print("叶节点不能有子节点");
			return;
		}
		Characters parentOfType = FindParentOfType<Characters>(this);
		_character = parentOfType;
		_stateMachine = _character.GetNode<StateMachine>("StateMachine");
	}
	public override double Utility()
	{
		return 0.0;
	}
}
